<template>
  <view class="panel-box">
    <image :src="showData.imageUrl" mode="widthFix"></image>
    <view class="type-layout">{{ showData.artist }}</view>
    <view class="info-box">
      <view class="title">{{ showData.title }}</view>
      <view class="status">{{ showData.status }}</view>
      <view class="price-box">
        <text class="rmb">¥</text>
        <text class="price">{{ showData.price }}</text>
        <text class="price-des">起</text>
      </view>
    </view>
  </view>
</template>

<script>
import { defineComponent, reactive, toRefs } from "vue";
export default defineComponent({
  name: "panel001",
  props: {
    showData: {
      type: Object,
      default: () => {
        return {
          id: 11,
          title: "北京·柯南·永远的一瞬主题快闪 官方限定特典礼包",
          artist: "展览休闲",
          location: "北京 | 西单大悦城1F东大堂",
          date: "2025.09.12-10.19",
          price: "139",
          status: "售票中",
          imageUrl: "/static/dataImage/damai/011.webp",
        };
      },
    },
  },
  components: {},
  setup(props) {
    const data = reactive({});
    return {
      ...toRefs(data),
    };
  },
});
</script>

<style scoped lang="less">
.panel-box {
  position: relative;
  // 缩放
  background: #fff;
  border-radius: 20rpx;
  overflow: hidden;
  image {
    width: 100%;
    display: block;
  }
  .type-layout {
    position: absolute;
    left: 15rpx;
    top: 15rpx;
    padding: 0rpx 8rpx;
    font-weight: 400;
    font-size: 24rpx;
    color: #fff;
    background: #ff1268;
    border-radius: 4rpx;
  }
  .info-box {
    padding: 10rpx 20rpx;
    .title {
      font-size: 26rpx;
      color: #000;
      // 显示2行多余省略号
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font-weight: 400;
      line-height: 40rpx;
    }
    .status {
      font-size: 22rpx;
      color: #999;
      margin: 10rpx 0;
    }
    .price-box {
      .rmb {
        font-size: 22rpx;
        font-weight: 700;
        margin-right: 5rpx;
        color: #ff6600;
      }
      .price {
        font-size: 34rpx;
        font-weight: 700;
      }
      .price-des {
        font-weight: 300;
        font-size: 22rpx;
        margin-left: 5rpx;
      }
    }
  }
}
</style>
